# Contributor: Clayton Craft <clayton@craftyguy.net>
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=tz
pkgver=0.6.1
pkgrel=3
pkgdesc="interactive TUI program that displays time across a few time zones of your choosing"
url="https://github.com/oz/tz"
arch="all"
license="GPL-3.0-or-later"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/oz/tz/archive/refs/tags/v$pkgver.tar.gz"

export GOMODCACHE="$srcdir/go"
export GOFLAGS="$GOFLAGS -modcacherw"
export CGO_ENABLED=0

build() {
	go build -v -ldflags="-s -w" .
}

check() {
	go test ./...
}

package() {
	install -Dm755 "tz" "$pkgdir/usr/bin/tz"
}

sha512sums="
a5db1d4c1204c46234a143b8e99ae2f78cd252f88bc62f8560da3ddd77195bc3c671b4a37ad321ce5cb6cda6c7aecc266c5023192f324dc80a4e080d6a80a96f  tz-0.6.1.tar.gz
"
